# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=usernamer
pkgver=20.12983f8
pkgrel=3
groups=('blackarch' 'blackarch-misc' 'blackarch-automation')
pkgdesc='Pentest Tool to generate usernames/logins based on supplied names.'
arch=('any')
url='https://github.com/jseidl/usernamer'
license=('GPL3')
depends=('python2')
makedepends=('git')
source=("git+https://github.com/jseidl/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i 's|/usr/bin/env python|/usr/bin/env python2|' "$pkgname.py"
}

package() {
  cd $pkgname

  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}

